package com.ssmtest.dao;

import com.ssmtest.entity.*;
import com.ssmtest.util.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface StudentDao {
	 Student findByStudenID(String studentID);//根据学生ID查询一条记录
	 void updateStudent(Student student);//更新学生的信息
	List<Student> findByStudentName(String name);//根据学生的姓名查找学生
	 List<Student> findByStudentClass(String sclass, Page page);//根据班级查找学生 -分页查询
	void save(Student student);//保存一个学生记录
	 List<Student> findStudentsByPage(Page page);//根据分页查询结果;
	 int fintStudentCount();//返回所有学生数量
	int fintStudentCountByClass(String sclass);//返回班级学生数量
	 List<Student> findStudentsByClass(String sclass, Page page);//查询班级学生 -分页查询
	 Student allowLogin(@Param("studentID") String studentID,@Param("password") String password);//判断学生登录
	 int insertSelective(@Param("studentID") String studentID,@Param("studentName") String studentName,@Param("sclass") String sclass);
	int updateByPrimaryKeySelective(@Param("studentID") String studentID,@Param("studentName") String studentName,@Param("sclass") String sclass);
	int selectCount();
	int selectxuanzecount();
	int selecttiankongcount();
	int selectpanduancount();
	int selectwendacount();
	List<Student> findByPage(@Param("start") Integer start,@Param("size") Integer size);
	List<Subject> findByPagexuanze( @Param("start") Integer start,@Param("size") Integer size);
	List<Student> selectbyclass(String sclass);
	List<Student> selectbyName(String studentName);
	List<Student> selectbyid(String studentID);
	int insertxuanzesubject(@Param("stTitle") String stTitle,@Param("stOptionA") String stOptionA,@Param("stOptionB") String stOptionB,@Param("stOptionC") String stOptionC,@Param("stOptionD") String stOptionD,@Param("stAnswer") String stAnswer,@Param("stParse") String stParse);
	int inserttiankongsubject(@Param("stTitle") String stTitle,@Param("stAnswer") String stAnswer,@Param("stParse") String stParse);
	int insertpanduansubject(@Param("stTitle") String stTitle,@Param("stAnswer") String stAnswer,@Param("stParse") String stParse);
	int insertwendasubject(@Param("stTitle") String stTitle,@Param("stAnswer") String stAnswer,@Param("stParse") String stParse);
	List<TiankongSubject> findByPagetiankong(Integer start, Integer size);
	List<PanduanSubject> findByPagepanduan(Integer start, Integer size);
	List<WendaSubject> findByPagewenda(Integer start, Integer size);

}
